import { BasicForm, FormSchema, useForm } from "@/components/Form";
import { useTranslation } from "react-i18next";

interface TableProps {
	onOk: () => void;
	onCancel: () => void;
}

const newAdd: React.FC<TableProps> = () => {
	const { t } = useTranslation();
	const formSchemaTop: FormSchema[] = [
		{
			label: t("system.role.role_name"),
			component: "Input",
			field: "field"
		},
		{
			label: t("system.role.role_identifier"),
			component: "Input",
			field: "code"
		},
		{
			label: t("system.role.display_order"),
			component: "Input",
			field: "sort"
		},
		{
			label: t("system.role.status"),
			component: "Select",
			field: "status"
		},
		{
			label: t("system.role.notes"),
			component: "InputTextArea",
			field: "remark"
		}
	];
	const [formTop] = useForm({
		schemas: formSchemaTop,
		labelWidth: 80
	});
	return (
		<>
			<BasicForm register={formTop}></BasicForm>
		</>
	);
};
export default newAdd;
